package net.hn.hnms.biz.quality.company.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.quality.company.service.CompanyStatisticService;
import net.hn.hnms.biz.quality.vo.CoalQualityVO;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.sys.common.satoken.config.AutoSetMineCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "煤制公司统计相关", tags = {"煤制公司统计相关"})
@RestController
@RequestMapping("/companyStatistic")
@EnableScheduling
public class CompanyStatisticController {

    @Autowired
    private CompanyStatisticService statisticService;

    @ApiOperation("经营综合概览-媒质分析折线图")
    @GetMapping("/getLastTenDaysCoalQuality")
    @AutoSetMineCode
    public R<List<CoalQualityVO>> getLastTenDaysCoalQuality(String companyCode) {
        return R.ok(statisticService.getLastTenDaysCoalQuality(companyCode));
    }
}
